{% extends base.html %}
{% block body %}

<div class="col-md-12 hide">
  <form id="searchForm1" method="GET" action="{{?action,'/search/search'}}">
      <div class="input-group">
          <input type="text" id="key" name="key" class="search-input" value="{{?key}}" placeholder="输入指令或搜索关键字" />
          <button class="search-btn">搜&nbsp;索</button>
      </div>
      <div class="col-md-12">
        <input type="radio" name="category" value="default" default-value="{{?category}}">默认
        <input type="radio" name="category" value="dict" default-value="{{?category}}">词典
        <input type="radio" name="category" value="content" default-value="{{?category}}">全文搜索
        <input type="radio" name="category" value="message" default-value="{{?category}}">记事
      </div>
  </form>
</div>

<div class="col-md-12">
  <span>搜索条件:</span> 
  <a class="link" href="/search?key={{?key}}&category=default">默认</a>
  <a class="link" href="/search?key={{?key}}&category=content">内容</a>
  <a class="link" href="/search?key={{?key}}&category=dict">词典</a>
  <a class="link" href="/search?key={{?key}}&category=message">记事</a>
  <a class="link" href="/search?key={{?key}}&category=book">图书</a>
</div>

<script type="text/javascript">
$(function () {
  $("#key").focus();

  // $("#searchForm [type=radio]").change(function () {
  //   $("#searchForm").submit();
  // })
});
</script>

{% include "mod_file_list.html" %}

{% end %}